<script setup lang="ts">
import F_site_base from "@/components/admin/f_site_base.vue";
import type {aiType} from "@/api/settings_api";
import {bigModelOptions} from "@/options";

const labelColProps = {
  span: 8
}
const wrapperColProps = {
  span: 16
}

const labelColProps1 = {
  span: 6
}
const wrapperColProps1 = {
  span: 18
}


</script>

<template>
  <div class="site_info_view">
    <f_site_base ref="fSiteBaseRef" name="ai" v-slot="{data}:{data: aiType}">
      <a-form>
        <a-row>
          <a-col :span="8">
            <div class="title">AI设置</div>
            <div class="body">
              <a-form-item label="大模型选择" :label-col-props="labelColProps1" :wrapper-col-props="wrapperColProps1">
                <a-select v-model="data.model" :options="bigModelOptions" placeholder="大模型选择"></a-select>
              </a-form-item>
              <a-form-item label="代理地址" :label-col-props="labelColProps1" :wrapper-col-props="wrapperColProps1">
                <a-input v-model="data.proxyUrl" placeholder="代理地址"></a-input>
              </a-form-item>
              <a-form-item label="api-key" :label-col-props="labelColProps1" :wrapper-col-props="wrapperColProps1">
                <a-input v-model="data.apiKey" placeholder="api-key"></a-input>
              </a-form-item>
              <a-form-item label="默认角色提示词" :label-col-props="labelColProps1" :wrapper-col-props="wrapperColProps1">
                <a-textarea :auto-size="{minRows: 4, maxRows: 5}" v-model="data.prompt" placeholder="默认角色提示词"></a-textarea>
              </a-form-item>
              <div class="update_btn">

              </div>
            </div>

          </a-col>
          <a-col :span="6" :offset="1">
            <div class="title">积分设置</div>
            <div class="body">
              <a-form-item label="创建角色消耗积分" :label-col-props="labelColProps" :wrapper-col-props="wrapperColProps">
                <a-input-number v-model="data.createRoleScope" placeholder="创建角色消耗积分"></a-input-number>
              </a-form-item>
              <a-form-item label="对话消耗积分" :label-col-props="labelColProps" :wrapper-col-props="wrapperColProps">
                <a-input-number v-model="data.chatScope" placeholder="对话消耗积分"></a-input-number>
              </a-form-item>
              <a-form-item label="用户注册赠送积分" :label-col-props="labelColProps" :wrapper-col-props="wrapperColProps">
                <a-input-number v-model="data.registerUserScope" placeholder="用户注册赠送积分"></a-input-number>
              </a-form-item>
              <a-form-item label="角色推荐赠送积分" :label-col-props="labelColProps" :wrapper-col-props="wrapperColProps">
                <a-input-number v-model="data.recommendRoleScope" placeholder="角色推荐赠送积分"></a-input-number>
              </a-form-item>
              <a-form-item label="更新角色消耗积分" :label-col-props="labelColProps" :wrapper-col-props="wrapperColProps">
                <a-input-number v-model="data.updateRoleScope" placeholder="更新角色消耗积分"></a-input-number>
              </a-form-item>
              <a-form-item label="删除角色消耗积分" :label-col-props="labelColProps" :wrapper-col-props="wrapperColProps">
                <a-input-number v-model="data.deleteRoleScope" placeholder="删除角色消耗积分"></a-input-number>
              </a-form-item>
            </div>
          </a-col>

        </a-row>
      </a-form>
    </f_site_base>
  </div>
</template>

<style lang="less">
.site_info_view {
  padding: 20px;

  .title {
    font-weight: 600;
    display: flex;
    align-items: center;
    font-size: 16px;
    margin-bottom: 10px;

    &::before {
      content: "";
      display: inline-block;
      width: 4px;
      height: 1.5rem;
      background-color: rgb(var(--arcoblue-6));
      margin-right: 5px;

    }
  }

  .start {
    .arco-col {
      justify-content: flex-start;
    }
  }
}
</style>